#include <stdio.h>

#define N 100

typedef struct big_int_s {
    char    bit[N];
}big_int_t;


void big_int_init(big_int_t *res, long init_val)
{
    int     i;
    long    val = init_val;
    char    bit;

    for (i=0; i<N; i++) {
        res->bit[i] = (char)(val % 10);
        val /= 10;
    }
}

void big_int_add(big_int_t *res, big_int_t *a)
{
    int i;
    char carry = 0;

    for (i=0; i<N; i++) {
        res->bit[i] = res->bit[i] + a->bit[i] + carry;
        carry = res->bit[i] / 10;
        res->bit[i] %= 10;
    }
}

void big_int_mul(big_int_t *res, long factor)
{
    int i, r;
    long p=0, carry = 0;

    for (i=0; i<N; i++) {
        p = res->bit[i] * factor + carry;
        carry = p / 10;
        res->bit[i] = p % 10;
    }
}

void big_int_print(big_int_t *a)
{
    int i, start = 0;
    long carry = 0;

    for (i=N-1; i>=0; i--) {
        if (a->bit[i]==0 && start==0)
            continue;
        printf("%d", a->bit[i]);
        start = 1;
    }
}

int main()
{
    big_int_t  sum, item;
    long i, n;
    big_int_init(&sum, 0);
    big_int_init(&item, 1);
    scanf("%ld", &n);
    for (i=1; i<=n; i++) {
        big_int_mul(&item, i);
        big_int_add(&sum, &item);
    }
    big_int_print(&sum);
    printf("\n");
    return 0;
}

